home *** CD-ROM | disk | FTP | other *** search
/ Ghost Rider iactivecard / Ghost Rider iactivecard.iso / pc / quiz.swf / scripts / DefineButton2_21 / BUTTONCONDACTION on(release).as
Encoding:
Text File  |  2007-04-17  |  1003 b   |  40 lines

  1. on(release){
  2.    if(!_root.Done)
  3.    {
  4.       point._visible = 1;
  5.       _root.myChoice = thisChoice;
  6.       removePoints(_name,this);
  7.       trace(_root.myChoice);
  8.       if(_root.myChoice != undefined)
  9.       {
  10.          _root.Done = true;
  11.          _root.totalAnswer++;
  12.          if(_root.myChoice)
  13.          {
  14.             giusta._visible = 1;
  15.             _root.correctAnswer++;
  16.             _root.score += 10;
  17.             _root.myscore = _root.score;
  18.             loadMovieNum("win.swf",12,"GET");
  19.          }
  20.          if(!_root.myChoice)
  21.          {
  22.             errata._visible = 1;
  23.             loadMovieNum("lose.swf",12,"GET");
  24.          }
  25.          if(_root.totalAnswer == _root.toDisplay)
  26.          {
  27.             _root.aspetta.itsEnd = true;
  28.             _root.aspetta.play();
  29.          }
  30.          else
  31.          {
  32.             _root.aspetta.play();
  33.          }
  34.          delete _root.myChoice;
  35.          _root.qbar.nextFrame();
  36.          _root.timer.gotoAndPlay(1);
  37.       }
  38.    }
  39. }
  40.